package com.romotc.joyin.bean;

import java.util.List;

public class CustomerGrantsService {

	private static final CustomerGrant qryInstance = new CustomerGrant();
	
	/**
	 * 查询id对应客服人员的客户数量
	 * @param id 客服人员Id
	 * @return
	 */
	public static int qryGrantsSize(long csId) {
		String filter = " csId = " + csId;
		return qryInstance.TotalCount(filter);
	}

	
	/**
	 * 查询出授权给csId的记录
	 * @param csId
	 * @return
	 */
	public static List<CustomerGrant> qryCustServiceGrantsList(long csId) {
		String filter = "csId = " + csId;
		int size = qryInstance.TotalCount(filter);
		if(size == 0) 
			return null;
		return (List<CustomerGrant>)qryInstance.Filter(filter, 1, size);
	}

}
